package com.by.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.by.entity.SpuExtension;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 江俊俊
 * @version 1.0
 * @description
 * @date 2025/4/10 21:08
 * @since JDK1.8
 */
@Mapper
public interface SpuExtensionMapper extends BaseMapper<SpuExtension> {

    /**
     * 锁定库存
     * @param spuId
     * @param num
     * @return
     */
    int lockSpuStock(@Param("spuId") Long spuId, @Param("num") int num);
}
